\(\int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx\) [844]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 34 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\sqrt {-1+x} \sqrt {1+x}-\arctan \left (\sqrt {-1+x} \sqrt {1+x}\right ) \]

[Out]

-arctan((-1+x)^(1/2)*(1+x)^(1/2))+(-1+x)^(1/2)*(1+x)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {103, 94, 209} \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\sqrt {x-1} \sqrt {x+1}-\arctan \left (\sqrt {x-1} \sqrt {x+1}\right ) \]

[In]

Int[(Sqrt[-1 + x]*Sqrt[1 + x])/x,x]

[Out]

Sqrt[-1 + x]*Sqrt[1 + x] - ArcTan[Sqrt[-1 + x]*Sqrt[1 + x]]

Rule 94

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))), x_Symbol] :> Dist[b*f, Subst[I
nt[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sqrt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] &&
 EqQ[2*b*d*e - f*(b*c + a*d), 0]

Rule 103

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(a + b
*x)^m*(c + d*x)^n*((e + f*x)^(p + 1)/(f*(m + n + p + 1))), x] - Dist[1/(f*(m + n + p + 1)), Int[(a + b*x)^(m -
 1)*(c + d*x)^(n - 1)*(e + f*x)^p*Simp[c*m*(b*e - a*f) + a*n*(d*e - c*f) + (d*m*(b*e - a*f) + b*n*(d*e - c*f))
*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && GtQ[m, 0] && GtQ[n, 0] && NeQ[m + n + p + 1, 0] && (Integ
ersQ[2*m, 2*n, 2*p] || (IntegersQ[m, n + p] || IntegersQ[p, m + n]))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps \begin{align*} \text {integral}& = \sqrt {-1+x} \sqrt {1+x}-\int \frac {1}{\sqrt {-1+x} x \sqrt {1+x}} \, dx \\ & = \sqrt {-1+x} \sqrt {1+x}-\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-1+x} \sqrt {1+x}\right ) \\ & = \sqrt {-1+x} \sqrt {1+x}-\tan ^{-1}\left (\sqrt {-1+x} \sqrt {1+x}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\sqrt {-1+x} \sqrt {1+x}-2 \arctan \left (\sqrt {\frac {-1+x}{1+x}}\right ) \]

[In]

Integrate[(Sqrt[-1 + x]*Sqrt[1 + x])/x,x]

[Out]

Sqrt[-1 + x]*Sqrt[1 + x] - 2*ArcTan[Sqrt[(-1 + x)/(1 + x)]]

Maple [A] (verified)

Time = 0.62 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.03

method result size
default \(\frac {\sqrt {-1+x}\, \sqrt {1+x}\, \left (\sqrt {x^{2}-1}+\arctan \left (\frac {1}{\sqrt {x^{2}-1}}\right )\right )}{\sqrt {x^{2}-1}}\) \(35\)

[In]

int((-1+x)^(1/2)*(1+x)^(1/2)/x,x,method=_RETURNVERBOSE)

[Out]

(-1+x)^(1/2)*(1+x)^(1/2)/(x^2-1)^(1/2)*((x^2-1)^(1/2)+arctan(1/(x^2-1)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\sqrt {x + 1} \sqrt {x - 1} - 2 \, \arctan \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) \]

[In]

integrate((-1+x)^(1/2)*(1+x)^(1/2)/x,x, algorithm="fricas")

[Out]

sqrt(x + 1)*sqrt(x - 1) - 2*arctan(sqrt(x + 1)*sqrt(x - 1) - x)

Sympy [F]

\[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\int \frac {\sqrt {x - 1} \sqrt {x + 1}}{x}\, dx \]

[In]

integrate((-1+x)**(1/2)*(1+x)**(1/2)/x,x)

[Out]

Integral(sqrt(x - 1)*sqrt(x + 1)/x, x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.38 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\sqrt {x^{2} - 1} + \arcsin \left (\frac {1}{{\left | x \right |}}\right ) \]

[In]

integrate((-1+x)^(1/2)*(1+x)^(1/2)/x,x, algorithm="maxima")

[Out]

sqrt(x^2 - 1) + arcsin(1/abs(x))

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.94 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\sqrt {x + 1} \sqrt {x - 1} + 2 \, \arctan \left (\frac {1}{2} \, {\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{2}\right ) \]

[In]

integrate((-1+x)^(1/2)*(1+x)^(1/2)/x,x, algorithm="giac")

[Out]

sqrt(x + 1)*sqrt(x - 1) + 2*arctan(1/2*(sqrt(x + 1) - sqrt(x - 1))^2)

Mupad [B] (verification not implemented)

Time = 2.20 (sec) , antiderivative size = 116, normalized size of antiderivative = 3.41 \[ \int \frac {\sqrt {-1+x} \sqrt {1+x}}{x} \, dx=\ln \left (\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}+1\right )\,1{}\mathrm {i}-\ln \left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )\,1{}\mathrm {i}-\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^2\,8{}\mathrm {i}}{{\left (\sqrt {x+1}-1\right )}^2\,\left (1+\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}-\frac {2\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}\right )} \]

[In]

int(((x - 1)^(1/2)*(x + 1)^(1/2))/x,x)

[Out]

log(((x - 1)^(1/2) - 1i)^2/((x + 1)^(1/2) - 1)^2 + 1)*1i - log(((x - 1)^(1/2) - 1i)/((x + 1)^(1/2) - 1))*1i -
(((x - 1)^(1/2) - 1i)^2*8i)/(((x + 1)^(1/2) - 1)^2*(((x - 1)^(1/2) - 1i)^4/((x + 1)^(1/2) - 1)^4 - (2*((x - 1)
^(1/2) - 1i)^2)/((x + 1)^(1/2) - 1)^2 + 1))